<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
        <h:form>
            <p:panel header="Login Form">
                <p:panelGrid columns="2">
                    <p:outputLabel for="usernameInput" value="Username"/>
                    <p:inputText id="usernameInput" value="#{loginBean.email}" 
                                 required="true" />
                    <p:outputLabel for="passwordInput" value="Password"/>
                    <p:password id="passwordInput" value="#{loginBean.password}" 
                                required="true" />
                    <p:commandButton value="Login" 
                                     action="#{loginBean.login()}" />
                </p:panelGrid>
            </p:panel>
        </h:form>
        <h:link outcome="registration" value="Register"/>
        <br />
        <h:link outcome="welcomePrimefaces" value="Primefaces welcome page" />
    </h:body>
</html>

